ContextCapture User Guide

3MX file

The 3MX contains general information about the scene, in JSON format. The JSON format was chosen because it is easy to handle and parse by web clients.

A file in 3MX format holds:
  • 3mxVersion – The file’s version number (float number)
  • name – The scene name (utf-8 string)
  • description – A description of the scene (utf-8 string).
  • It can contain HTML tags, but it should not contain new lines.
  • logo – Logo of the owner of the scene, as a relative path to an image (JPG or PNG).
  • sceneOptions – A collection of display options for the scene.
  • layers – One or several layers, containing different types of data. The geometry present in a scene is described in such layers.

The sceneOptions tag is reserved for the displaying application; custom fields can be added to define application-related options.

In the layers collection, each layer has to have an ID and a type. Type-dependent data can be added to a layer description.

Figure 4 shows a schema of the 3MX organization.

3MX scene file format

For now, 3MX declares a single type of layer: meshPyramid. The meshPyramid layer describes a unique 3D textured pyramidal mesh, in the 3MXB form.

Mesh pyramid layer

A layer of type meshPyramid contains the following set of tags:
id   The layer's ID (utf-8 string).
type: meshPyramid The layer type.
name   The layer name (utf-8 string).
description   A description of the layer (utf-8 string).
SRS   The spatial reference system (utf-8 string). Only needed for georeferenced data. See also About Spatial reference systems.
SRSOrigin: [O0, O1, O2] The model origin, in the specified SRS (array of float32). A point's correct coordinates in the specified SRS are P = Pmesh + SRSOrigin. Optional.
root   The relative path to the root 3MXB file (utf-8 string).

As an example, here is a full 3MX scene file:

{
"3mxVersion": 1,
"name":"Marseille",
"description":"Marseille was generated using InterAtlas‘ oblique imagery system. ",
"logo":"interatlas_logo.png",
"sceneOptions":[{"navigation_mode":"PAN"}],
"layers": 
[
     {
"type":"meshPyramid",
"id":"mesh0",
"name":"Marseille",
"description":"This is a description of the model. It should be between quotation marks.",
"SRS": "EPSG:32631",
"SRSOrigin": [692625,4798280,0],
"root": "Data/Marseille.3mxb"
    }
  ]
}

Using the root contained in the scene layers, the geometry can be loaded, starting with the root 3MXB file.